<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ taglib uri="/WEB-INF/jstlfun.tld" prefix="myfn" %>
<%@ taglib uri="/WEB-INF/c.tld"  prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<TITLE>会员列表:i友邻</TITLE>
	<link rel="stylesheet" type="text/css" href="${cpath}/css/adgloab.css"/>
	<link rel="stylesheet" type="text/css" href="${cpath}/css/adstyle.css" />
	
</head>
<body>
<script> 
	//转页面
	var curUserID = '${userID}';
	if((curUserID == "")||(curUserID == null)){
//		parent.window.location.replace("${cpath}/index.jsp"); 
	}
</script>

		<form action="${cpath}/users.do" name="theForm"  method="post" enctype="multipart/form-data" >
		<DIV id=admin>

		<!-- 右侧宽栏 {{{ -->
		<DIV class=group_mid>

				<div class='subtop' >
					<p><a href="#"><img src="${cpath}/images/slogo.png" ></a></p>
					<dl >
						<dd class="info"><span>状&nbsp;&nbsp;&nbsp;&nbsp;态：</span>
						<tag:ARRAY name="qryStatus" tagname='' options="<%=ValueMaping.USER_STS%>" value="${theForm.qryStatus}"/></dd>
						<dd class="info"><span>用&nbsp;&nbsp;户&nbsp;&nbsp;名：</span>
						<input type='text' name='nick' value='' class="short" /></dd>
						<dd class="info"><span>用户职责：</span>
						<tag:ARRAY name="qryType" tagname='' options="<%=ValueMaping.USER_TYPE%>" value="${theForm.qryType}"/></dd>
					</dl>
					<div class='fun'>
						<li><a href="javascript:history.go(-1);">返&nbsp;&nbsp;回</a></li>
						<li><a href="javascript:doConfirm()">查&nbsp;&nbsp;询</a></li>
					</div>
				</div>
			<hr/>
			<DIV class='whole'><!-- 右侧宽栏 }}}-->
				<table class="info">
						<thead>
							<tr align=left>
								<th width="10%">会员ID</th>
								<th width="10%">用户名</th>
								<th width="12%">Email</th>
								<th width="8%">状态</th>
								<th width="10%">加入日期</th>								
								<th width="10%">用户职责</th>								
							</tr>
						</thead>
						<tbody>
							<c:forEach var="user" items="${userlist}" varStatus="status">   
							<tr  <c:if test="${status.count%2!=0}"> bgcolor='#F2F3F6' </c:if> align=left>
								<td ><c:out value="${user.userID}"></c:out>
								</td>
								<td >
								<a href="${cpath}/users.do/home/userID_${user.userID}.html" target="_blank"><c:out value="${user.nick}"></c:out></a>
								</td>
								<td ><c:out value="${user.email}"></c:out></td>
								<td >
								<tag:ARRAY name="status" tagname='' options="<%=ValueMaping.USER_STS%>" value="${user.status}" onchange="javascript:Chgsts(${user.userID},this.value);"/>
								</td>
								<td >${myfn:formatMDHM(user.ctime)}</td>
								<td >
								<tag:ARRAY name="type" tagname='' options="<%=ValueMaping.USER_TYPE%>" value="${user.type}" onchange="javascript:Chgtype(${user.userID},this.value);"/>
								</td>
							</tr>
							</c:forEach> 
							<tr align="left">   
							 <td colspan="6">
								<!-- 分页主键 formName字段当前的form名称 -->
								<%@ include file="/jsplib/page.jsp" %>
								<!--隐藏域-->
								<input type="hidden" name='action' value='adlist'/>
							 </td>
							</tr>  
						</tbody>
				</table>
			</div>			
			</DIV><!-- content }}} -->
		</DIV><!-- profile_mid }}} -->
	</DIV><!-- group end }}} -->
	</form>

</body>
</html>
<!---->
<script>
  /**
   * 检查项目资料维护
   */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

		form.submit();
	}
	function Chgsts(userID,sts)
	{
		if(confirm("确定修改会员状态？")){

			window.location.href('${cpath}/users.do?action=adupdate&status=' + sts + '&userID=' + userID ); 
		}
	}
	function Chgtype(userID,type)
	{
		if(confirm("确定修改会员类型？")){

			window.location.href('${cpath}/users.do?action=adupdate&type=' + type + '&userID=' + userID ); 
		}
	}

</script>

